<style>
    .required{
        color: #9f191f;
        font-size: 16px;
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>{:__('Basic Info')}</legend>
    </fieldset>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">* </span>{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-category_id" data-rule="required" class="form-control selectpicker" name="row[category_id]">
                {foreach name="parentList" item="vo"}
                <option data-type="{$vo.type}" value="{$key}" >{$vo.name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">* </span>{:__('Goods_type_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_type_id" data-rule="required" data-source="goods/type/index" class="form-control selectpage" name="row[goods_type_id]" type="text" placeholder="请选择商品编类别" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">* </span>{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" placeholder="请输入商品名称" maxlength="100" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Bn')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-bn" class="form-control" name="row[bn]" placeholder="{:__('Please enter the Goods BN')}" maxlength="30" type="text">
        </div>
        {:__('Auto generate without fillin')}
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Brand_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand_id" data-source="goods/brand/index" class="form-control selectpage" name="row[brand_id]" type="text" placeholder="{:__('Please select Goods Brand')}" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Brief')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brief" class="form-control" name="row[brief]" placeholder="{:__('Please enter the Goods brief, no more than 200 words')}" maxlength="200" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">* </span>{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>{:__('Sale Info')}</legend>
    </fieldset>

    <div id="product-info">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2"><span class="required">* </span>{:__('Price')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" min="0" value="0.00" type="number">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Costprice')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-costprice" class="form-control" step="0.01" name="row[costprice]" min="0" value="0.00" type="number">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Mktprice')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-mktprice" class="form-control" step="0.01" name="row[mktprice]" min="0" value="0.00" type="number">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Sn')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-sn" class="form-control" name="row[sn]" placeholder="{:__('Please enter the SN')}" maxlength="30" type="text">
            </div>
            {:__('Auto generate without fillin')}
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-stock" class="form-control" name="row[stock]" type="number" min="0" value="0">
            </div>
        </div>
    </div>

    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>{:__('Goods Detail')}</legend>
    </fieldset>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_nomal_virtual')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_nomal_virtual]', $isNormalVirtual, 1)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Market_switch')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input  id="c-market_switch" name="row[market_switch]" type="hidden" value="1">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-market_switch" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success  fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Top_switch')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input  id="c-top_switch" name="row[top_switch]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-top_switch" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weight')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weight" class="form-control" step="0.01" name="row[weight]" type="number" min="0" value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-unit" class="form-control" name="row[unit]" placeholder="请输入商品单位,例如：件" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Intro_content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-intro_content" class="form-control editor" rows="5" name="row[intro_content]" cols="50"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" name="open_spec" value="0">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
